- Thursday, September 26, 2024
Memory safety vulnerabilities pose a significant challenge to software security, and Google is actively addressing this issue through a strategy known as Safe Coding. This approach emphasizes the transition to memory-safe programming languages as a means to reduce vulnerabilities at their source. The blog post, authored by Jeff Vander Stoep and Alex Rebert, outlines the rationale behind this strategy and presents data demonstrating its effectiveness, particularly in the context of Android development. The authors highlight that focusing on Safe Coding for new code can lead to a surprising reduction in overall security risks, even as the amount of memory-unsafe code increases. This counterintuitive outcome is attributed to the nature of vulnerabilities, which tend to decay over time. Research indicates that most vulnerabilities are found in new or recently modified code, suggesting that by prioritizing memory-safe languages for new features, the overall density of vulnerabilities can decrease significantly. The blog provides a detailed analysis of the transition that the Android team began around 2019, driven by the rising costs and complexities associated with managing memory safety vulnerabilities. Over a six-year period, the percentage of memory safety vulnerabilities in Android dropped from 76% to 24%, a notable improvement that aligns with the shift towards memory-safe languages. The authors discuss the evolution of strategies to combat memory safety vulnerabilities, categorizing them into four generations. The first generation focused on reactive patching, which proved costly and insufficient. The second generation involved proactive mitigations, which raised the cost of exploitation but also imposed performance overhead. The third generation emphasized proactive vulnerability discovery through tools like sanitizers and fuzzing, yet these methods often addressed symptoms rather than root causes. The fourth generation, which Google is now pursuing, centers on high-assurance prevention through Safe Coding. This approach integrates security directly into the development process, leveraging language features and static analysis to create a secure-by-design ecosystem. By establishing a baseline of security through memory-safe languages, the goal is to reduce vulnerability density and improve overall software quality. The blog also emphasizes the importance of interoperability between memory-safe and memory-unsafe languages, allowing for a gradual transition without the need to rewrite existing code. Google has invested in tools and initiatives to facilitate this interoperability, such as grants to the Rust Foundation and the development of interoperability tooling. As Safe Coding continues to reduce risks, the authors anticipate a shift in the reliance on traditional mitigations and detection methods. They expect that as more code transitions to memory-safe languages, the need for exploit mitigations will decrease, leading to more efficient software. Additionally, proactive detection methods like fuzzing may become more effective as they can be applied to smaller, well-encapsulated code segments. In conclusion, the blog post underscores the importance of adopting Safe Coding practices to combat memory safety vulnerabilities effectively. By focusing on prevention and leveraging the natural decay of vulnerabilities, Google aims to enhance the security of its software products, particularly within the Android ecosystem. The commitment to secure-by-design principles is expected to yield long-term benefits in reducing vulnerabilities and improving overall software safety.
- Friday, September 27, 2024
Memory safety vulnerabilities pose a significant challenge to software security, and Google is actively addressing this issue through a strategy known as Safe Coding. This approach emphasizes the transition to memory-safe programming languages as a means to reduce vulnerabilities at their source. The belief is that by focusing on Safe Coding for new code, the overall security risk of a codebase can be significantly diminished, leading to a notable decline in memory safety vulnerabilities. The blog post highlights a remarkable statistic: the percentage of memory safety vulnerabilities in Android has decreased from 76% to 24% over a six-year period, coinciding with a shift towards memory-safe languages. This transition is not just a theoretical exercise; it has practical implications that can be observed in the Android codebase. A key insight shared is the counterintuitive nature of the results. As new development increasingly incorporates memory-safe languages, the overall number of memory safety vulnerabilities declines, even as the amount of memory-unsafe code grows. This phenomenon can be explained by the concept of vulnerability decay, where vulnerabilities tend to reside in newer or recently modified code. As older code matures, it becomes less prone to vulnerabilities, leading to an overall reduction in risk. The Android team began prioritizing memory-safe languages around 2019, driven by the rising costs and complexities associated with managing memory safety vulnerabilities. The results have been promising, with a continued decline in memory safety vulnerabilities observed in 2024. This decline is attributed to the correlation between the programming languages used for new code and the prevalence of memory safety issues. The blog also outlines the evolution of strategies to combat memory safety vulnerabilities over the years. The first generation focused on reactive patching, which proved costly and insufficient. The second generation introduced proactive mitigations, but these often came with performance overhead and did not fully address the root causes. The third generation emphasized proactive vulnerability discovery, yet still fell short of providing high assurance. The fourth generation, which Google is now embracing, is centered around high-assurance prevention through Safe Coding. This approach integrates security directly into the development process, allowing for continuous assurance and reducing the likelihood of introducing vulnerabilities. By leveraging memory-safe languages and focusing on secure-by-design practices, Google aims to break the cycle of constant vulnerability management and instead foster a more secure development environment. Interoperability is highlighted as a crucial aspect of this transition. Rather than discarding existing memory-unsafe code, Google is working on making interoperability between memory-safe and unsafe languages seamless. This strategy allows for incremental improvements while capitalizing on existing code investments. As Safe Coding continues to reduce risks, the reliance on previous generations of security measures is expected to diminish. The focus will shift towards more selective use of mitigations and enhanced effectiveness of proactive detection methods. In conclusion, the adoption of Safe Coding represents a paradigm shift in how software security is approached. By prioritizing memory-safe languages and integrating security into the development lifecycle, Google is not only addressing current vulnerabilities but also setting a foundation for a more secure future in software development. The ongoing efforts and results from the Android team serve as a testament to the effectiveness of this strategy, with further insights and developments anticipated in the coming months.
- Monday, March 11, 2024
Google has published a whitepaper that outlines its "Secure by Design" approach, which advocates for the adoption of languages like Java, Go, and Rust to achieve high-assurance memory safety. Google has a massive C++ codebase. It will gradually adopt memory-safe languages for new code while seeking safety improvements for existing C++.
- Friday, September 20, 2024
The Safe C++ Extensions proposal, recently published by the C++ community, aims to address the challenge of ensuring that C++ code is free of memory safety bugs. Private and public sector organizations have been pushing programmers to write new applications and rewrite old ones in memory safe languages over the past two years. The majority of serious vulnerabilities in large codebases come from memory safety flaws. The Safe C++ project adds new technology for ensuring memory safety, preventing users from writing unsafe code. It allows existing code to work as always and ensures stakeholders have control for incrementally opting into safety.
- Thursday, March 7, 2024
Google held an event called “LLM bugSWAT” where people uncovered vulnerabilities in Google's systems. The authors of this article found significant security flaws, including an Insecure Direct Object Reference in Google's Bard and a Denial of Service vulnerability through Directive Overloading in Google's Cloud Console. They used Gemini Extensions to exfiltrate sensitive personal information by cleverly bypassing the Content Security Policy, a feat that rewarded them with a $50,000 reward.
- Monday, June 10, 2024
Google has integrated AI into its internal software development tools, with developers now using AI-based code completion for 50% of code characters. It has improved both model accuracy and user experience, and the company plans to further leverage AI in areas like testing, code understanding, and code maintenance. The industry as a whole is moving towards adding natural language as a common interface for software engineering tasks, like fixing bugs and writing new code.
- Thursday, April 25, 2024
Prabhakar Raghavan, senior vice president at Google, recently addressed staff in Google's knowledge and information organization about upcoming changes to how the company will operate. Growth for Google is getting harder, so the company needs to react and move faster. The company is shortening the amount of time some teams have to complete certain projects, despite having fewer resources after cost cuts, in an effort to move faster. It plans to build teams closer to users in key markets, including India and Brazil.
- Tuesday, March 12, 2024
Google's LLM bugSWAT event challenged hackers to find security flaws in their AI systems. Participants Joseph "REZ0" Thacker, Justin "RHYNORATER" Gardner, and Roni "LUPIN" Carta discovered vulnerabilities in Google's AI features, including exploiting a GraphQL endpoint and leaking information from Google Workspace via Bard's new extensions. Their collective efforts earned them $50,000 with Thacker, Carta, and Gardner securing the top three competition places respectively.
- Monday, August 5, 2024
Google is adding a new 2B parameter model, safety content classifier model, and model interpretability tool to the Gemma 2 family.
- Monday, September 16, 2024
Google has announced confidential matching, a privacy-first tool that uses Trusted Execution Environments (TEEs) to secure first-party data for audience targeting and campaign measurement. The solution ensures that sensitive business data is isolated and protected, even from Google, during processing. It is now the default for Customer Match in Google Ads as part of Google's broader privacy initiatives.
- Monday, June 3, 2024
Strong types in programming languages like C++ and Rust, which enforce specific data types and rules for variables, lead to fewer bugs, more expressive APIs, and potentially better performance. They prevent invalid input, improve code clarity, and reduce the need for repetitive error checking (like in JavaScript with undefined).
- Monday, July 8, 2024
Google's core code tooling team has trained a smart paste model that adjusts code pasted in based on the context. They found a 42% acceptance rate for 6% of all copied code.
- Thursday, April 11, 2024
CodeGemma, a collaborative effort between Google and Hugging Face, is a family of open-access, code-specialized LLMs. The models are available in 2B and 7B configurations. They have been fine-tuned with a lot of data to bring better performance in logical reasoning and programming suggestions.
- Thursday, September 5, 2024
Jaana Dogan, a Principal Engineer at Google, wrote a post about database-related issues commonly overlooked. It emphasizes the importance of understanding nuances like ACID compliance, isolation levels, and data consistency. It also talks about the pitfalls of auto-incrementing primary keys, optimistic locking, write skews, and clock skews.
- Tuesday, September 10, 2024
Google's AI Overviews, powered by the Gemini language model, faced heavy criticism for inaccuracies and dangerous suggestions after its U.S. launch. Despite the backlash, Google expanded the feature to six more countries, raising concerns among publishers about reduced traffic and misrepresented content. AI strategists and SEO experts emphasize the need for transparency and better citation practices to maintain trust and traffic.
- Thursday, July 11, 2024
The new React compiler has some limitations in addressing memory leaks caused by closures, particularly in the context of memoization hooks. While the compiler effectively caches values that don't depend on state or props, it doesn't prevent the underlying issue of shared closure contexts that can lead to prolonged memory retention. The author demonstrates this with a code example where creating a new object dependent on state within a memoized function results in a memory leak despite the compiler's memoization.
- Thursday, May 2, 2024
Google has laid off at least 200 employees from its Core teams. The reorganization will involve moving some roles to India and Mexico. The Core unit is responsible for building the technical foundation behind Google's flagship products and for protecting users' online safety. The Core layoffs also include the governance and protected data group, which will be at the center of regulatory challenges facing the company. Affected employees have access to outplacement services and will be able to apply for open roles within Google.
- Friday, June 28, 2024
Google Sheets initially used a Java-based calculation engine, but later switched to JavaScript for browser-based calculations. Due to performance limitations of JavaScript compared to Java, Google used WasmGC, an extension to WebAssembly that allows for efficient compilation of garbage-collected languages like Java. The initial prototype was slower than JavaScript, but optimizations like replicating JVM/V8 optimizations, using browser APIs, and making code more platform-agnostic resulted in huge performance improvements.
- Friday, May 10, 2024
Google has introduced Protobuf Editions, a new feature flag system that lets plugin maintainers granularly control the behavior of generated APIs and runtimes. Editions combines existing proto2 and proto3 functionality and is backwards-compatible. It is recommended that developers stick with proto3 for now.
- Tuesday, March 19, 2024
Solana's program security is critical to ensuring applications behave as intended, affecting performance, scalability, and interoperability. As such, developers must understand potential attack vectors and vulnerabilities such as logic bugs, data validation flaws, and access control vulnerabilities and employ strategies like rigorous testing and code auditing to mitigate risks. This comprehensive guide delves into common vulnerabilities developers might face, offering insights and mitigation strategies to safeguard Solana programs against exploits.
- Friday, June 14, 2024
Smart Paste is a tool broadly available at Google that predicts the next state of a code environment and uses generative AI to create context-aware adjustments to pasted code. It streamlines the process of copy-pasting during code revisions. When testing the tool with around 40,000 engineers, Google found that 6.9% of all pastes in the IDE utilized Smart Paste - 42.5% of suggestions from the feature were accepted. This article discusses how Google developed the feature.
- JavaScript's garbage collection can lead to memory leaks due to retained global variable references.Wednesday, July 31, 2024
JavaScript garbage collection doesn't always release memory when a function is no longer callable, especially if the function's scope contains references to global variables, leading to memory leaks.
- Tuesday, March 5, 2024
Java is evolving to incorporate concepts popularized by Rust, such as immutable data structures by default and algebraic data types. These changes were inspired by Rust's emphasis on compile-time safety guarantees. Developers can now define immutable records in Java. Java's new sealed interfaces and exhaustive switch syntax enable the use of algebraic data types so that code handles all possible states of a variable in a type-safe manner.
- Friday, August 2, 2024
There are common myths about how Google handles JavaScript during the indexing process. Through a study involving over 100,000 Googlebot fetches, researchers found that Google can render and index JavaScript content, including complex SPAs, dynamically loaded content, and streamed content. The study also debunked the myth of a significant rendering queue, showing that most pages are rendered within minutes, not days or weeks. As a result, people should feel free to use JS frameworks in their websites while still making sure that pages load fast.
- Monday, April 8, 2024
DNS cache poisoning attacks exploit weaknesses in DNS to redirect users to malicious sites. Google Public DNS protects against these attacks using a few techniques. It randomizes cases, altering the capitalization of domain names. This protects over 90% of Google Public DNS traffic. Google also uses DNS-over-TLS (ADoT) to encrypt communications with authoritative nameservers.
- Monday, September 30, 2024
Google has recently introduced AlphaChip, a groundbreaking AI-assisted chip design technology that utilizes reinforcement learning to optimize chip layouts. This innovative approach significantly accelerates the design process, allowing for the creation of chip floorplans in just a few hours, compared to the traditional timeline of up to 24 months for complex chips. The technology aims to enhance performance, power efficiency, and overall design quality, making it a valuable tool for companies like Google and MediaTek, which have already begun implementing it in their chip designs. Historically, chip design has been a labor-intensive and costly endeavor, particularly during the floorplanning phase. While existing AI-assisted tools have emerged, they often come with high costs, limiting accessibility. Google’s AlphaChip seeks to democratize this technology, making it more available to a broader range of developers. The system operates by treating chip floorplanning as a game, where it places circuit components on a grid and learns from each layout it creates, improving its efficiency over time. Since its inception in 2020, AlphaChip has been instrumental in designing Google's Tensor Processing Units (TPUs), which are crucial for powering various AI models and cloud services. The technology has evolved with each generation of TPUs, including the latest 6th Generation Trillium chips, enhancing their performance and reducing development time. Although AlphaChip has shown remarkable capabilities, human developers still play a significant role in the design process, particularly for more complex tasks. The success of AlphaChip has sparked interest in further research into AI applications across different stages of chip design, including logic synthesis and timing optimization. Google envisions a future where AI-driven optimization could revolutionize the entire chip design lifecycle, leading to faster, smaller, and more energy-efficient chips. As AlphaChip continues to develop, its applications may expand beyond current uses, potentially impacting a wide range of technologies in the future. In summary, Google’s AlphaChip represents a significant advancement in chip design technology, leveraging AI to streamline processes and improve outcomes. Its ongoing development and application could reshape the semiconductor industry, making chip design more efficient and accessible.
- Monday, March 11, 2024
This project takes on the challenge of reducing harmful content in AI across multiple languages by using translation to improve safety measures where direct data is lacking.
- Wednesday, March 6, 2024
Google's March 2024 core update is designed to improve the quality of Search by showing less content that feels like it was made to attract clicks and more content that people find useful. Google also announced 3 new spam policies to address expired domain abuse, scaled content abuse, and site reputation abuse. Both the core update and the spam update launched on March 5th and will take 2-4 weeks to fully roll out.
- Monday, March 4, 2024
Google's recent AI debacle with its Gemini image and text generation tool has sparked an internal crisis, with plummeting morale and calls for CEO Sundar Pichai's resignation. While the public focuses on potential bias in the tool, the root cause lies in organizational chaos: unclear ownership of Gemini's development and a lack of accountability within Google teams. This dysfunction led to hasty decision-making and insufficient coordination, resulting in the tool's problematic outputs.
- Monday, June 3, 2024
Google introduced AI Overviews to enhance search results, providing users with more accurate and relevant information, especially for complex queries. While some issues arose, such as erroneous results and misinterpreted content, Google has implemented over a dozen technical improvements to address these challenges, including better detection of nonsensical queries and limiting user-generated content in AI Overviews.